package com.damuzee.${moduleName}.${packageName}.domain;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;

import org.mybatis.sql.BaseBean;
import org.mybatis.sql.annotation.BaseResultMap;

import com.damuzee.${moduleName}.${packageName}.persistence.${beanName}Mapper;

/**
 * auto generator
 * 
 * @auth karka.w
 */
 
@Table(name = "${tableName}")
@BaseResultMap(name=${beanName}Mapper.class)
public class ${beanName} extends BaseBean implements java.io.Serializable {

    <#list column as c>
 	<#if c.prikey>
    //主键
 	@Id
 	</#if>
  	@Column(name = "${c.columnName}")
  	private ${c.type} ${c.fieldName} ;                              //${c.remarks}
  	
    </#list>

    //构造函数
    public ${beanName}(){}

    <#list column as c>
    <#if c.prikey>
    public ${beanName}(<#list column as c> <#if c.prikey><#if c_index != 0>,</#if>${c.type} ${c.fieldName}</#if></#list>){
        <#list column as c>
         <#if c.prikey>
        this.${c.fieldName} = ${c.fieldName};
         </#if>
        </#list>
    }
    </#if>
    </#list>

    public ${beanName}( <#list column as c><#if c_index != 0>, </#if>${c.type} ${c.fieldName}</#list>){
    <#list column as c>
        this.${c.fieldName} = ${c.fieldName};
    </#list>
    }

    //getter和setter方法
    <#list column as c>
	public ${c.type} get${c.fieldMethod}() {
		return ${c.fieldName};
	}

	public void set${c.fieldMethod}(${c.type} ${c.fieldName}) {
		this.${c.fieldName} = ${c.fieldName};
	}

    </#list>
}